var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    imgurl: app.urlimg,
    coupon_info:"",
    gift_info:"",
    istrue:0,
    goods: [
      { img: '../../images/u213.png', text: '骆驼运动羽绒服 情侣款轻便经典简约保暖立领羽绒服男款', digital: '20', },
    ],
    personal:[
      { people: '张三', phone: '13006112253', address: '广东省广州市白云区石槎路396号骆驼大厦六楼', coding:'510080',},
    ],

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    console.log(options);
    wx.request({
      url: app.url + 'api_blessing/gift_log',
      data: {
        id: options.id,
      },
      header: {
        'content-type': 'application/json',
        'token': wx.getStorageSync('token_key')
      }, success: function (res) {
        console.log(res);
        that.setData({
          coupon_info: res.data.result.coupon_info,
          gift_info: res.data.result.gift_info,
          goods_list: res.data.result.goods_list,
        })
      }
    })

  },

  // 猜你喜欢列表
  click_goods: function (e) {
    wx.navigateTo({
      url: '/pages/index/detail/index?id=' + e.currentTarget.id,
    })
  },
})